# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=npapi-vlc
pkgver=2.2.6
_pkglibver="0_git20180718"
pkgrel=1
pkgdesc="NPAPI browser plugin based on libvlc"
url="https://code.videolan.org/videolan/npapi-vlc"
arch="all !s390x !mips !mips64 !armhf" # vlc missing
license="GPL-2.0-or-later"
makedepends="vlc-dev automake autoconf libtool npapi-sdk libx11-dev libxcb-dev
	gtk+2.0-dev"
source="https://code.videolan.org/videolan/npapi-vlc/-/archive/$pkgver/npapi-vlc-${pkgver}.tar.bz2
	https://dev.alpinelinux.org/archive/$pkgname/libvlcpp-${_pkglibver}.tar.gz
	"
builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	default_prepare
	cd "$srcdir"
	mv libvlcpp-master-* libvlcpp-master
	cd "$builddir"
	cp -rf "$srcdir"/libvlcpp-master/vlcpp .
	./autogen.sh
}

check() {
	cd "$builddir"
	make check
}

build() {
	cd "$builddir"
	./configure --prefix=/usr
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="688ed0909955ec797fe23739e96220617be3e947025f83548a463f92d29578f5cb9015b1effa0ac4a43cf689be29368a602b9cb5b0475d2a90da94e9266d3c13  npapi-vlc-2.2.6.tar.bz2
7a505e17b7bf3f74d39b63ae608ad72b59367f7653e935d35a616800e4dbddc95750f1437a3022f0d17f6ff34c40dc93b060ef35bb08973849d43b2332a5ebae  libvlcpp-0_git20180718.tar.gz"
